<#include "/included/view_meta_global.ftl">
<body>
<script>
shortcut.add("Ctrl+return",articlrPost);
function articlrPost(){
	if($("#title").val().length<1){
		$("#warning").append("title can not be null").addClass("warnMessage");
		return false;
	}
	$("#sub").attr("disabled","disabled").attr("value","loading");
	document.postform.submit();
}
</script>
<div id="maxw">
<!-- header part -->
<#include "/included/header_global.ftl">
<!-- end header part -->

<div id="leftpart">
<form action="#"  name="postform" onSubmit="return articlrPost();" method="post">
	<div id="warning"></div>
	<p class="post_page">Give a title to your article here: <br>
		<input type="text" name="title" id="title" class="i" value="${article?if_exists.title?if_exists}">
		<input type="hidden" name="articleOwnerId" value="${article?if_exists.user_id?if_exists}">
  	<p class="post_page">Enter the full body of your article here, feel free to ask questions/challenge the readers:<br>
		<textarea name="content" style="width:88%; height:300px; font-size:12px">${article?if_exists.content?if_exists}</textarea>
  	<p class="post_page">Give some tags to your article here:<span class="tip">more separated with "," eg: spring mysql...(optional)</span>
  		<input type="text" name="tag" class="i"  value="${article?if_exists.tag_name?if_exists}"><br>
  	<p class="post_page"><select name="type"><option value="0">技术文章</option>
  											 <option value="1">疑难求救</option>
  											 <option value="2">非技术文章</option></select>
  	<p><input type="submit" id=sub value=<#if article?exists>"update your article"<#else>"post your article"</#if>><span class="tip" style="font-size:0.9em;">(Ctrl+Enter)</span>
</form>
</div>
<!-- 右半边 right side part -->
<div id="rightpart"><#include "/included/rightside_global.ftl"></div>
<!-- end 右半边  right side part -->

<!-- 底部 footer  -->
<#include "/included/footer_global.ftl">
<!-- end  底部 footer  -->
</div><!-- end  maxw  -->
</body>
</html>
